import Login from '@/views/Login'
import Home from '@/views/Home'
import City from '@/views/City'

import Rent from '@/views/Rent'
import Add from '@/views/Rent/Add'
import Search from '@/views/Rent/Search'

import Detail from '@/views/Detail'
import Map from '@/views/Map'
import Favorite from '@/views/Favorite'

import Layout from '@/views/Layout'
import List from '@/views/Layout/List'
import News from '@/views/Layout/News'
import Profile from '@/views/Layout/Profile'

export default [
  {
    path: '/',
    redirect: '/home'
  },
  {
    name: 'login',
    path: '/login',
    component: Login
  },
  {
    name: 'city',
    path: '/city',
    component: City
  },
  {
    name: 'rent',
    path: '/rent',
    component: Rent
  },
  {
    name: 'add',
    path: '/rent/add',
    component: Add
  },
  {
    name: 'search',
    path: '/rent/search',
    component: Search
  },
  {
    name: 'detail',
    path: '/detail/:value',
    component: Detail
  },
  {
    name: 'map',
    path: '/map',
    component: Map
  },
  {
    name: 'favorite',
    path: '/favorite',
    component: Favorite
  },
  {
    name: 'layout',
    path: '/layout',
    component: Layout,
    children: [
      {
        name: 'home',
        path: '/home',
        component: Home
      },
      {
        name: 'news',
        path: 'news',
        component: News
      },
      {
        name: 'list',
        path: 'list',
        component: List
      },
      {
        name: 'profile',
        path: 'profile',
        component: Profile
      }
    ]
  }
]
